Ext.define('Triends.view.AgreementConfirm', {
	extend: 'Ext.Panel',
	xtype: 'agrmtconfirm',
	id: 'agrmtconfirm',
	config: {
    	modal: true,
    	top: '10%',
    	left: '50%',
    	layout: 'vbox',
    	style: 'margin-left:-150px',
		hideOnMaskTap: true,
		width: 300,
		height: 350,
		listeners: {
			hide: function() {
				this.destroy();
			}
		},
    	items: [
    	{
 	 		xtype: 'panel',
 	 		docked: 'top',
 	 		style: {'background': '-webkit-gradient(linear, left top, left bottom, from(#FEFCFC), to(#E9E8E8))'},
 	 		items:[
 	 			{
 	 				xtype: 'panel',
 	 				style: 'margin-top:-2px',
 	 				html: "<div valign='center' align='center'><font size='1'><b>이용약관에 대한 동의여부를 선택해주세요</b></font></div>"
 	 			}]
 	 	},
    	{
    		xtype: 'panel',
    		id: 'agreementpanel',
    		scrollable: true,
    		width: '100%',
    		padding: 10,
    		height: 280
    	},
    	{
    		xtype: 'panel',
    		docked: 'bottom',
    		layout: 'hbox',
    		items:[{
	    		xtype: 'button',
	    		flex: 1,
	    		ui: 'small',
	    		height: 35,
	    		text: '동의',
	    		handler: function() {
	    				Triends.app.getHistory().add(Ext.create('Ext.app.Action', {
        					url: 'join'
    					}));
	    				
	    		}	    		
	    	},
	    	{
    		xtype: 'button',
    		flex: 1,
    		ui: 'small',
    		height: 35,
    		text: '취소',
    		handler: function() {
    			Ext.getCmp('agrmtconfirm').destroy();
    		}
    	}]
    	}]
	}
});